package com.kerry.configure;

import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.kerry.listener.MyHttpSessionListener;



@Configuration
public class ListenerConfigure {
	
	@Bean
	public ServletListenerRegistrationBean<MyHttpSessionListener> serssionListenerBean(){
		ServletListenerRegistrationBean<MyHttpSessionListener> 
		sessionListener = new ServletListenerRegistrationBean<MyHttpSessionListener>(new MyHttpSessionListener());
		return sessionListener;
	}
	
	
//	@Bean
//	public ServletListenerRegistrationBean<MyServletContextListener> servletContextListenerBean(){
//		ServletListenerRegistrationBean<MyServletContextListener> 
//		sessionListener = new ServletListenerRegistrationBean<MyServletContextListener>(new MyServletContextListener());
//		return sessionListener;
//	}

}
